\(\int \frac {\csc (x)}{a+a \csc (x)} \, dx\) [5]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 12 \[ \int \frac {\csc (x)}{a+a \csc (x)} \, dx=-\frac {\cot (x)}{a+a \csc (x)} \]

[Out]

-cot(x)/(a+a*csc(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3879} \[ \int \frac {\csc (x)}{a+a \csc (x)} \, dx=-\frac {\cot (x)}{a \csc (x)+a} \]

[In]

Int[Csc[x]/(a + a*Csc[x]),x]

[Out]

-(Cot[x]/(a + a*Csc[x]))

Rule 3879

Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[-Cot[e + f*x]/(f*(b + a*
Csc[e + f*x])), x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\cot (x)}{a+a \csc (x)} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(26\) vs. \(2(12)=24\).

Time = 0.09 (sec) , antiderivative size = 26, normalized size of antiderivative = 2.17 \[ \int \frac {\csc (x)}{a+a \csc (x)} \, dx=\frac {2 \sin \left (\frac {x}{2}\right )}{a \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )} \]

[In]

Integrate[Csc[x]/(a + a*Csc[x]),x]

[Out]

(2*Sin[x/2])/(a*(Cos[x/2] + Sin[x/2]))

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.17

method result size
default \(-\frac {2}{a \left (\tan \left (\frac {x}{2}\right )+1\right )}\) \(14\)
norman \(-\frac {2}{a \left (\tan \left (\frac {x}{2}\right )+1\right )}\) \(14\)
parallelrisch \(-\frac {2}{a \left (\tan \left (\frac {x}{2}\right )+1\right )}\) \(14\)
risch \(-\frac {2}{\left (i+{\mathrm e}^{i x}\right ) a}\) \(16\)

[In]

int(csc(x)/(a+a*csc(x)),x,method=_RETURNVERBOSE)

[Out]

-2/a/(tan(1/2*x)+1)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.83 \[ \int \frac {\csc (x)}{a+a \csc (x)} \, dx=-\frac {\cos \left (x\right ) - \sin \left (x\right ) + 1}{a \cos \left (x\right ) + a \sin \left (x\right ) + a} \]

[In]

integrate(csc(x)/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-(cos(x) - sin(x) + 1)/(a*cos(x) + a*sin(x) + a)

Sympy [F]

\[ \int \frac {\csc (x)}{a+a \csc (x)} \, dx=\frac {\int \frac {\csc {\left (x \right )}}{\csc {\left (x \right )} + 1}\, dx}{a} \]

[In]

integrate(csc(x)/(a+a*csc(x)),x)

[Out]

Integral(csc(x)/(csc(x) + 1), x)/a

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.33 \[ \int \frac {\csc (x)}{a+a \csc (x)} \, dx=-\frac {2}{a + \frac {a \sin \left (x\right )}{\cos \left (x\right ) + 1}} \]

[In]

integrate(csc(x)/(a+a*csc(x)),x, algorithm="maxima")

[Out]

-2/(a + a*sin(x)/(cos(x) + 1))

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08 \[ \int \frac {\csc (x)}{a+a \csc (x)} \, dx=-\frac {2}{a {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}} \]

[In]

integrate(csc(x)/(a+a*csc(x)),x, algorithm="giac")

[Out]

-2/(a*(tan(1/2*x) + 1))

Mupad [B] (verification not implemented)

Time = 17.55 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08 \[ \int \frac {\csc (x)}{a+a \csc (x)} \, dx=-\frac {2}{a\,\left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )} \]

[In]

int(1/(sin(x)*(a + a/sin(x))),x)

[Out]

-2/(a*(tan(x/2) + 1))